## common helper functions, package loading
source('../../init.R')
## individuals are by row
s06 <- read.csv('reaction-times.csv')
## transpose and melt, now individuals are in Var2
s06.melt <- melt(t(s06))
## 
s06.melt$Var2 <- factor(s06.melt$Var2) 
## each individual, plus everyone together
s06.melt <- rbind(s06.melt, 
    data.frame(Var1=NA, Var2='All', value=unlist(s06))
)



mypng('reaction-boxplot.png', code=
    bwplot( value ~  factor(Var2), s06.melt, 
        as.table=T, 
        xlab='Response #', ylab='Reaction time (in distance, mm)'
    )
)

mypng('reaction-hist.png', code=
    histogram( ~ value |  factor(Var2), s06.melt, 
        as.table=T, xlab='Reaction time (in distance, mm)'
    )
)

